/**
 * 
 */
package com.CMUBiS.Depreciated;

/*import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;


import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import org.json.*;

import com.CMUBiS.SQLDb;
/**
 * @author John I. Payne
 *
 
@WebServlet(name="Login", urlPatterns="/loginold")
public class LoginServletOld extends HttpServlet{
	/**
	 * 
	 
	private static final long serialVersionUID = 6575041003028438743L;

	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		SQLDb CMUBiS = new SQLDb();
		String username = (String) req.getParameter("username");
		String password = (String) req.getParameter("password");
		String authToken = CMUBiS.login(username,password);
		
		
		resp.setContentType("application/json");
		PrintWriter out = resp.getWriter();
		Map<String, String> map = new HashMap<String, String>();
		if(authToken == null){
			map.put( "Error", "1" );
			map.put( "ErrorMessage", "Unable to validate username and password." );
		}else{
			
			map.put( "Error", "0" );
			map.put( "username", username );
			map.put( "authToken", authToken.toString() );
		}
		JSONObject jsonObject = null;
		jsonObject = (JSONObject) JSONObject.wrap(map);
		out.print(jsonObject);
	}
}
*/